<!DOCTYPE html>
<html>
<head>
<title>代码生成器</title>
<#include "/header.html">
</head>
<body>
<div id="rrapp">
	<form action="">
		<select name="book_status" id="book_status_id">
			<option value='1'>正常</option>
			<option value='0'>报修</option>
			<option value='2'>维护</option>
			<option value='3'>报废</option>
		</select>
		<select name="sell_status" id="sell_status_id">
			<option value='0'>非销售</option>
			<option value='1'>销售</option>
		</select>
		<button onclick="update()">确认</button>
		<button >取消</button>
	</form>
</div>
<script type="text/javascript">
	var rfidCode = GetQueryString("rfidCode");
	function update(){
		/* var bookStatusObj = document.getElementById("book_status_id");
		var bookStatusValue = bookStatusObj.options[index].value;
		var sellStatusObj = document.getElementById("sell_status_id");
		var sellStatusValue = sellStatusObj.options[index].value; */
		var bookStatusValue = $('#book_status_id option:selected').val()
		var sellStatusValue = $('#sell_status_id option:selected').val()
		console.log(bookStatusValue);
		console.log(sellStatusValue);
		var data ={"rfidCode":rfidCode,"status":bookStatusValue,"sellStatus":sellStatusValue}
		console.log(data);
		ajaxPost("operation/book/updateBookStatus",data,"修改成功");
		parent.location.reload();
	}
</script>
</body>
</html>